package com.gxa.service.impl;


import com.gxa.entity.Campus;
import com.gxa.entity.Department;
import com.gxa.mapper.DepartmentMapper;
import com.gxa.service.DepartmentService;
import com.gxa.vo.DepartmentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<DepartmentVo> queryAll() {

        return this.departmentMapper.queryAll();
    }

    @Override
    public List<DepartmentVo> queryAll1(String name) {
        return this.departmentMapper.queryAll1(name);
    }

    @Override
    public void insertDepartment(Department department) {
        this.departmentMapper.insertDepartment(department);
    }

    @Override
    public List<Campus> queryCampus() {
        return this.departmentMapper.queryCampus();
    }

    @Override
    public List<DepartmentVo> queryAll2(DepartmentVo departmentVo) {
        return this.departmentMapper.queryAll2(departmentVo);
    }

    @Override
    public Integer queryId(DepartmentVo departmentVo) {
        return this.departmentMapper.queryId(departmentVo);
    }

    @Override
    public void updateDepartment(Department department) {
        this.departmentMapper.updateDepartment(department);
    }

    @Override
    public Integer queryCampusId(String name) {
        return this.departmentMapper.queryCampusId(name);
    }

    @Override
    public void deleteById(DepartmentVo departmentVo) {
        this.departmentMapper.deleteById(departmentVo);
    }
}
